package cn.imvc.core;

import org.apache.log4j.Logger;

import com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor;

public class Struts2Exception extends ExceptionMappingInterceptor {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	Logger logger = Logger.getLogger(Struts2Exception.class);

	public boolean isLogEnabled() {
		return true;
	}

	protected void handleLogging(Exception e) {
		doLog(logger, e);
	}

	protected void doLog(Logger logger, Exception e) {
		logger.error(e.getMessage(), e);
	}

}
